﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Modeling;
using VsxFactory.Modeling.VisualStudio;
using VsxFactory.Modeling.Repository;

namespace VsxFactory.Modeling.Strategies
{
    public interface IProgressDialog : IDisposable 
    {
        void Update(string texte, int value = 0);
    }

    public interface IStrategyContext
    {
        IStrategySettings Settings { get; }
        void ClearErrors();
        void WriteError(string format, params object[] parms);
        ModelElement Element { get; set; }
        Guid PropertyId { get; set; }
        object OldPropertyValue { get; set; }
        VsxFactory.Modeling.Strategies.CodeGenerationEvent GenerationEvent { get; set; }
        T GetService<T>();
        TService GetService<TKey, TService>();
        string ModelFileName { get; }
        IServiceProvider ServiceProvider { get; }
        IVsSolutionExplorer SolutionExplorer { get; }
        VsxFactory.Modeling.Strategies.IGenerationStrategy Strategy { get; }
        void WriteLogMessage(string format, params object[] parms);
        IProgressDialog ShowProgressDialog(string title, string text);
        bool PromptYesNo(string text);
        IStandardPackageRepository LocalRepository { get;}
        ReferencePackageRepository SolutionRepository { get; }
    }
}
